<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        width: 200px;
        height: 200px;
        position: absolute;
        top: 100px;
        left: 100px;
      }
    </style>
  </head>
  <body>
    <div>
      <input type="text" />
    </div>
    <script>
      window.onload = function () {
        var a = document.querySelector("div");
        console.log(a.style.top);
      };
    </script>
  </body>
</html>
